<?php
class login extends common
{
    function index()
    {
        $user_id = isset($_GET['user_id']) ? intval($_GET['user_id']) : 0;
        $ip = ip2long($_SERVER['REMOTE_ADDR']);
        $expire_time = 3600;
        setcookie('spread_user_id', $user_id, time() + $expire_time, '/');
        $spread_user_sign = md5($user_id . TOKEN_KEY . $ip);
        setcookie('spread_user_sign', $spread_user_sign, time() + $expire_time, '/');

        header("Location: /spread_admin.php?act=income_month_list");
    }
}

?>